package lm.concurrency.day5.CAS;

/**
 * @Auther: Min.Liu
 * @Description:
 * @Date: Created in 11:06 2024/11/7
 */
class AccountUnsafe implements Account {
    private Integer balance;

    public AccountUnsafe(Integer balance) {
        this.balance = balance;
    }

    @Override
    public Integer getBalance() {
        return balance;
    }

    @Override
    public void withdraw(Integer amount) {
        balance -= amount;
    }
}

